﻿<UserControl
    x:Class="EString.PropertyGrid.Editors.MarginEditor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:EString.PropertyGrid.Editors"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:EString_Silverlight_Behaviours="using:EString.Controls" xmlns:converters="using:EString.Converters"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="452">
    <UserControl.Resources>
        <SolidColorBrush x:Key="TextBrush" Color="Black"/>
        <converters:BoolConverter x:Key="MyBoolConverter"/>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" HorizontalAlignment="Left">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>


        <EString_Silverlight_Behaviours:CustomNUD x:ConnectionId='1' Min="-500" IsEnabled="{Binding ElementName=chkAll, Path=IsChecked, Converter={StaticResource MyBoolConverter}}" x:Name="sliderLeft"  VerticalAlignment="Top" Grid.Column="1"                                         HorizontalAlignment="Left"  />
        <EString_Silverlight_Behaviours:CustomNUD x:ConnectionId='2'  Min="-500" IsEnabled="{Binding ElementName=chkAll, Path=IsChecked, Converter={StaticResource MyBoolConverter}}" x:Name="sliderTop" 
                                                  VerticalAlignment="Top" Grid.Column="1" Grid.Row="1" Margin="0,2,0,0"                                       HorizontalAlignment="Left" />
        <EString_Silverlight_Behaviours:CustomNUD x:ConnectionId='3'  Min="-500" IsEnabled="{Binding ElementName=chkAll, Path=IsChecked, Converter={StaticResource MyBoolConverter}}" x:Name="sliderRight"
                                                  VerticalAlignment="Top" Grid.Column="1" Grid.Row="2" Margin="0,2,0,0"                                         HorizontalAlignment="Left" />

        <EString_Silverlight_Behaviours:CustomNUD x:ConnectionId='4'  Min="-500" IsEnabled="{Binding ElementName=chkAll, Path=IsChecked, Converter={StaticResource MyBoolConverter}}" 
		x:Name="sliderBottom" 
		VerticalAlignment="Top" Grid.Column="1" Grid.Row="3" Margin="0,2,0,0"                                          HorizontalAlignment="Left" />

        <TextBlock VerticalAlignment="Center" Text="Left" TextWrapping="Wrap" HorizontalAlignment="Left" />
        <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Text="Top" TextWrapping="Wrap" Grid.Row="1" Margin="0,2,0,0" />
        <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Text="Right" TextWrapping="Wrap" Grid.Row="2" Margin="0,2,0,0" />
        <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Text="Bottom" TextWrapping="Wrap" Grid.Row="3" Margin="0,2,2,0" />
        <CheckBox x:Name="chkAll" Content="All" d:LayoutOverrides="Width, Height" Grid.Row="4" VerticalAlignment="Center" Margin="0,2,0,0"/>
        <EString_Silverlight_Behaviours:CustomNUD x:ConnectionId='5'  Min="-500"  x:Name="nudAll"                                      IsEnabled="{Binding ElementName=chkAll, Path=IsChecked}" d:LayoutOverrides="Width, Height" Grid.Row="5" Grid.Column="2" Margin="0,2,0,0"/>
    </Grid>
</UserControl>

